
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package com.primecodegen.common.bean;

//~--- non-JDK imports --------------------------------------------------------


import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import org.primefaces.model.DashboardColumn;
import org.primefaces.model.DashboardModel;
import org.primefaces.model.DefaultDashboardColumn;
import org.primefaces.model.DefaultDashboardModel;

//~--- JDK imports ------------------------------------------------------------




import javax.faces.bean.ManagedBean;


/**
 *
 * @author mawwad
 */
@ManagedBean(name="myHomeBean")
public class HomeBean implements  Serializable{
    
    protected static final Logger logger = Logger.getLogger( HomeBean.class.getName());
    private DashboardModel model;




    public void fillDashBoard(){
        //logger.info( "homebean" );
        model = new DefaultDashboardModel();

        DashboardColumn column1 = new DefaultDashboardColumn();
        DashboardColumn column2 = new DefaultDashboardColumn();
        DashboardColumn column3 = new DefaultDashboardColumn();
        DashboardColumn column4 = new DefaultDashboardColumn();

        column1.addWidget( "sports1" );
        column2.addWidget( "sports2" );
        
        column3.addWidget( "sports3" );
        column4.addWidget( "sports4" );
        model.addColumn( column1 );
        model.addColumn( column2 );
        model.addColumn( column3 );
        model.addColumn( column4 );
    }
    public HomeBean(){
        for (int i = 0; i < 10; i++) {
            test[i] = new testTable("<bold>name </bold>"+i, "<h1>test</h1>",200+"",200+"");

        }
    }

    testTable[] test = new testTable[10];
    private String tt;

    public testTable[] getTest() {
        return test;
    }

    public void setTest(testTable[] test) {
        this.test = test;
    }

    public String getTt() {
        return tt;
    }

    public void setTt(String tt) {
        this.tt = tt;
    }

    public  void doit(){
        tt=tt;
    }

    public DashboardModel getModel() {
        return model;
    }

    public void setModel(DashboardModel model) {
        this.model = model;
    }

}


